package com.rabbitmq.demo.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by dangjing on 18-8-24.
 */
@Component
public class HelloReceiver {

    @RabbitHandler
    @RabbitListener(queues = "hello")
    public void process(String hello){
        System.out.println("Receiver1 : " + hello);
    }


    @RabbitHandler
    @RabbitListener(queues = "hello")
    public void process2(String hello){
        System.out.println("Receiver2 : " + hello);
    }
}
